<template>
  <div>
    <ActivityLayout
      :activityArray="array"
      :state="mode"
      :num="page_num"
    ></ActivityLayout>
  </div>
</template>

<script>
import ActivityLayout from "../../components/activity_layout/activity_layout";
import RequestUtils from "../../utils/requestUtils.js";
export default {
  props: {},
  name: "HomeLiked",
  components: {
    ActivityLayout,
  },
  mounted() {
    // that.array = [
    //   {
    //     activityPic:
    //       "https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png",
    //     avatarSrc:
    //       "https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png",
    //     activityName: "标题",
    //     activityProfile: "test13",
    //     publisherId: 1,
    //   },
    // ];
    let that = this;
    let result = "";
    let callback = function (res) {
      console.log(res);
      result = res.data.result;
      that.page_num = result.totalPages;
      that.array = result.content;
    };
    RequestUtils.requestActivitiesByOrder(
      that,
      "hotest",
      0,
      6,
      callback,
      callback
    );
  },
  methods: {},
  data() {
    return {
      array: [],
      mode: "hotest",
      page_num: 0,
    };
  },
};
</script>

<style >
</style>